package workspace.teaweb.Logistics.service;

import org.apache.ibatis.annotations.Param;
import springfox.documentation.annotations.ApiIgnore;
import workspace.teaweb.CRM.pojo.vo.CRMVO;
import workspace.teaweb.Logistics.pojo.dto.*;
import workspace.teaweb.Logistics.pojo.entity.Logistics;
import workspace.teaweb.Logistics.pojo.entity.Order;
import workspace.teaweb.Logistics.pojo.entity.Warehouse;
import workspace.teaweb.Logistics.pojo.vo.orderVO;
import workspace.teaweb.User.pojo.vo.UserVO;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface LogisticsService {
    void insertlogistics(Logistics logistics);
    void updateGetlogistics(LogisticsGetDto logistics);
    void updatePostlogistics(LogisticsPostDto logistics);
    Logistics selectlogisticsById(Long id);
    List<Logistics> selectlogisticsByCRMid(Logistics logistics);//物流单查询（根据CRMid）

    //物流单查询（根据PostWarehouseid、status）
    Logistics selectlogisticsByPostWarehouseidAndStatus(Long PostWarehouseid,String status);
    //物流单查询（根据GetWarehouseid、status）
    Logistics selectlogisticsByGetWarehouseidAndStatus(Long GetWarehouseid,String status);

    void CRMinsertOrder(Order order, Logistics logistics);

    void UserinsertOrder(Order order);//客户增加订单
    //改变订单状态
    void CRMupdateOrderStatus(Order order);
    //查询订单

    List<Order> CRMselectOrderById(OrderDto order,CRMVO CRMVo);
    Order selectOrderByLogisticsid(int logisticsid);

    //仓库入库
    void insertWarehouse(Warehouse warehouse, CRMVO CRMVo);

    void AutoinsertWarehouse(Warehouse warehouse);

    void updateWarehouse(WarehouseDto2 warehouse, CRMVO CRMVo);
    void AutoupdateWarehouse(WarehouseDto2 warehouse);
    void UserupdateWarehouse(Warehouse warehouse);
    List<Warehouse> selectAllWarehouse(WarehouseDto warehouse, CRMVO CRMVo);

    void deleteWarehouseById(int id);

    List<orderVO> UserselectOrderById(Long id, UserVO userVO);

    void UserupdateOrderStatus(Long id);

    List<orderVO> AdminselectOrderById(Long id, UserVO userVO);

    List<orderVO> AdminselectOrderByOrderId(Long orderId, UserVO userVO);

    void AdminupdateOrder(Order order);
}
